define(function(){
	function fn(){
		//右侧浮动工具栏
		$("#float_right").css("height",$("body").height());
		$("#float_right>.right_con").css("top",($(window).height() - 488) / 2);
		$(window).resize(function(){
			$("#float_right .right_con").css("top",($(window).height() - $(".right_con").height()) / 2);
		})
		$(".right_con ul>li:not(:nth-of-type(2))").hover(function(){
			//移入
			$(this).css("background","#c40000").children("div").css("display","block").animate({
				opacity:1,right:32
			},200);
			$(this).children("a").css("color","#fff");
		},function(){
			//移出
			$obj = $(this);
			$obj.css("background","#eaeaea").children("div").animate({
				opacity:0,right:80
			},200,function(){
				$obj.children("div").css("display","none");
			});
			$obj.children("a").css("color","#c40000");
		})
		$(".right_cart_btn").hover(function(){
			$(".right_cart_btn").parent().css("background","#c40000");
			$(".right_cart_btn").css("color","#fff");
		},function(){
			$(".right_cart_btn").parent().css("background","#eaeaea");
			$(".right_cart_btn").css("color","#c40000");
		})
		//回到顶部
		$(".right_con li:last-child").click(function(){
			$('body,html').animate({scrollTop:0},500);
		})
	}
	return {
		fn: fn	
	}
})